From 8536211db6656ac55bb97a84870a3efdf878bb46 Mon Sep 17 00:00:00 2001 From: "kaf24@localhost.localdomain" Date: Fri, 26 Jan 2007 17:33:58 +0000 Subject: [PATCH] Don't clobber vcpu flags when getting vcpu context. Signed-off-by: Keir Fraser --- xen/arch/x86/domctl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 36b0b3b4d0..e3c28e6c0b 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -410,7 +410,6 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) #else #define c(fld) (c.nat->fld) #endif - unsigned long flags; if ( !IS_COMPAT(v->domain) ) memcpy(c.nat, &v->arch.guest_context, sizeof(*c.nat)); @@ -444,12 +443,11 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) c(user_regs.eflags |= v->arch.iopl << 12); } - flags = 0; + c(flags &= ~(VGCF_i387_valid|VGCF_in_kernel)); if ( test_bit(_VCPUF_fpu_initialised, &v->vcpu_flags) ) - flags |= VGCF_i387_valid; + c(flags |= VGCF_i387_valid); if ( guest_kernel_mode(v, &v->arch.guest_context.user_regs) ) - flags |= VGCF_in_kernel; - c(flags = flags); + c(flags |= VGCF_in_kernel); if ( !IS_COMPAT(v->domain) ) c.nat->ctrlreg[3] = xen_pfn_to_cr3(pagetable_get_pfn(v->arch.guest_table)); -- 2.30.2